<template>
  <div>
    <p>
      路由的fullPath---
      {{$route.fullPath}}
    </p>
    <p>
      收到的参数
      {{$route.params}}
      {{$route.query}}
    </p>
    <a-button type="primary"  @click="toRedPage()">跳到red页（通过路由path跳转）</a-button>

  </div>
</template>

<script>
export default {
  name: "Blue",
  mounted() {
    console.log(this.$route)

  },
  methods:{
    toRedPage(){
      //通过路由path跳转 时不支持传params参数，只支持query参数
      this.$router.push({
        path:'/red/123',
        query:{
          key:'qwerty'
        }
      });
    }
  }
}
</script>

<style scoped>

</style>
